package com.ruoyi.voucher.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.voucher.mapper.VoucherAccessoryMapper;
import com.ruoyi.voucher.domain.VoucherAccessory;
import com.ruoyi.voucher.service.IVoucherAccessoryService;

/**
 * 凭证附件Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-21
 */
@Service
public class VoucherAccessoryServiceImpl implements IVoucherAccessoryService 
{
    @Autowired
    private VoucherAccessoryMapper voucherAccessoryMapper;

    /**
     * 查询凭证附件
     * 
     * @param id 凭证附件主键
     * @return 凭证附件
     */
    @Override
    public VoucherAccessory selectVoucherAccessoryById(Long id)
    {
        return voucherAccessoryMapper.selectVoucherAccessoryById(id);
    }

    /**
     * 查询凭证附件列表
     * 
     * @param voucherAccessory 凭证附件
     * @return 凭证附件
     */
    @Override
    public List<VoucherAccessory> selectVoucherAccessoryList(VoucherAccessory voucherAccessory)
    {
        return voucherAccessoryMapper.selectVoucherAccessoryList(voucherAccessory);
    }

    /**
     * 新增凭证附件
     * 
     * @param voucherAccessory 凭证附件
     * @return 结果
     */
    @Override
    public int insertVoucherAccessory(VoucherAccessory voucherAccessory)
    {
        return voucherAccessoryMapper.insertVoucherAccessory(voucherAccessory);
    }

    /**
     * 修改凭证附件
     * 
     * @param voucherAccessory 凭证附件
     * @return 结果
     */
    @Override
    public int updateVoucherAccessory(VoucherAccessory voucherAccessory)
    {
        return voucherAccessoryMapper.updateVoucherAccessory(voucherAccessory);
    }

    /**
     * 批量删除凭证附件
     * 
     * @param ids 需要删除的凭证附件主键
     * @return 结果
     */
    @Override
    public int deleteVoucherAccessoryByIds(Long[] ids)
    {
        return voucherAccessoryMapper.deleteVoucherAccessoryByIds(ids);
    }

    /**
     * 删除凭证附件信息
     * 
     * @param id 凭证附件主键
     * @return 结果
     */
    @Override
    public int deleteVoucherAccessoryById(Long id)
    {
        return voucherAccessoryMapper.deleteVoucherAccessoryById(id);
    }
}
